package com.bridge.common.base;

import android.app.Application;
import android.content.Context;
import android.os.StrictMode;

import androidx.annotation.NonNull;

import com.bridge.common.R;
import com.bridge.common.http.HttpConfig;
import com.bridge.common.http.HttpManager;
import com.bridge.common.interfaces.Services;
import com.scwang.smartrefresh.layout.SmartRefreshLayout;
import com.scwang.smartrefresh.layout.api.DefaultRefreshFooterCreator;
import com.scwang.smartrefresh.layout.api.DefaultRefreshHeaderCreator;
import com.scwang.smartrefresh.layout.api.RefreshFooter;
import com.scwang.smartrefresh.layout.api.RefreshHeader;
import com.scwang.smartrefresh.layout.api.RefreshLayout;
import com.scwang.smartrefresh.layout.constant.SpinnerStyle;
import com.scwang.smartrefresh.layout.footer.ClassicsFooter;
import com.scwang.smartrefresh.layout.header.ClassicsHeader;

/**
 * Created by xsk on 9/17/0017.
 */
public class BaseCommonApp {
    private static Application instance = null;

    public static void setInstance(Application ins) {
        instance = ins;
    }

    public static Application getInstance() {
        if (instance == null) {
            instance = BaseCommonApp.instance;
        }
        return instance;
    }

    static {
        String BaseUrlTest="https://api-test.juaiyouxuan.com";
//        String BaseUrl="https://gateway.juaiyouxuan.com";
        HttpManager.init(BaseUrlTest, HttpConfig.TIMEOUT, Services.class  ,instance);
    }

}
